﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DiscountControl.ascx.cs" Inherits="PayrollHR.Administration.Modules.DiscountControl" %>
<%@ Register Src="ToolTipLabelControl.ascx" TagName="ToolTipLabelControl" TagPrefix="uc1" %>
<%@ Register Src="SimpleTextBox.ascx" TagName="SimpleTextBox" TagPrefix="uc2" %>
<%@ Register Src="ConfirmationBox.ascx" TagName="ConfirmationBox" TagPrefix="uc3" %>
<%@ Register src="DatePicker.ascx" tagname="DatePicker" tagprefix="uc4" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-configuration.png" alt="Chiết khấu" />
        (chiết khấu)
    </div>
</div>
<div>
    <div style="width: 60%; float: left; display: inline-block;">
        <table class="adminContent">
            <tr>
                <td class="adminTitle">
                    <uc1:ToolTipLabelControl ID="lblStartDate" runat="server" Text="<%$ PayrollResources:Admin.Order.StartDate.Text %>"
                        ToolTip="<%$ PayrollResources:Admin.Order.StartDate.ToolTip %>" ToolTipImage="~/Administration/Common/ico-help.gif" />
                </td>
                <td class="adminData">                    
                    <uc4:DatePicker ID="DateApplyDatePicker" runat="server" />                    
                </td>
                <td class="adminTitle">
                    <uc1:ToolTipLabelControl ID="ToolTipLabelControl1" runat="server" Text="Chiết khấu %"
                        ToolTip="Chiết khấu %" ToolTipImage="~/Administration/Common/ico-help.gif" />
                </td>
                <td class="adminData">
                    <asp:TextBox ID="txtDiscountPercentage" runat="server"></asp:TextBox>
                </td>
                <td class="adminTitle">
                    <uc1:ToolTipLabelControl ID="ToolTipLabelControl2" runat="server" Text="Chiết khấu tiền"
                        ToolTip="Chiết khấu tiền" ToolTipImage="~/Administration/Common/ico-help.gif" />
                </td>
                <td class="adminData">
                    <asp:TextBox ID="txtDiscountAmount" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvDiscount" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="DiscountID"
            OnPageIndexChanging="gvDiscount_PageIndexChanging" OnRowDataBound="gvDiscount_RowDataBound" AllowPaging="True" PageSize="15">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:CheckBox ID="cbSelectAll" runat="server" CssClass="cbHeader" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbDiscountID" runat="server" CssClass="cbRowItem" ToolTip="<% $PayrollResources:Admin.Customers.CustName.ToolTip %>" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="0.5%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ngày hiệu lực">
                    <ItemTemplate>
                        <asp:Label ID="lblStartDate" runat="server" Text='<%# Eval("StartDate", "{0:MM/dd/yyyy}")%>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="5%" HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="%">
                    <ItemTemplate>
                        <asp:Label ID="lblDiscountPercentage" runat="server" Text='<%# Bind("DiscountPercentage")%>' 7></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="5%" HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tiền">
                    <ItemTemplate>
                        <asp:Label ID="lblDiscountAmount" runat="server" Text='<%# Eval("DiscountAmount","{0:0,0}")%>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="5%" HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div style="margin-left: 300px;">
        <div class="options">
            <asp:Button ID="AddButton" runat="server" Text="Cập nhật chiết khấu"
                CssClass="adminButtonBlue" OnClick="AddButton_Click" ToolTip="Filter" />
            <asp:Button runat="server" Text="Delete"
                CssClass="adminButtonBlue" ID="btnDelete" OnClick="btnDelete_Click" ValidationGroup="ExportXLS"
                ToolTip="Delete Device" />
            <uc3:ConfirmationBox ID="cbDelete" runat="server" TargetControlID="btnDelete"
                YesText="<% $PayrollResources:Admin.Common.Yes %>" NoText="<% $PayrollResources:Admin.Common.No %>"
                ConfirmText="<% $PayrollResources:Admin.Common.AreYouSure %>" />
        </div>
    </div>
</div>
